<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<%
   String path = request.getContextPath();
   String basePath =request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<base href="<%= basePath %>">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Insert title here</title>
<link rel="stylesheet" href="static/css/xgtx.css" />
</head>
	<body>		
				<div class="content_form"> <div class="avatar_form"> 
					<form action="upload" class="ui-form" method="post" enctype="multipart/form-data"> 
						<img id="nickPic" class="ui-pic" src="${tx==null?'static/img/sdefault1477559405444.png':tx}" alt=""> 
							<div class="ui-tip"> 
								<span class="ui-change">更换头像</span> 
								<div class="ui-bg"></div> 
							</div> 
							<input id="uploadAvartar" class="ui-file" type="file" name="image"> 
							<input id="picUrl" class="ui-input" type="hidden" value="${tx==null?'static/img/sdefault1477559405444.png':tx}">
					</form>
				</div> 
				<span id="pic-tip" class="ui-pic-tip"></span> 
					<div class="subbox clearfix"> 
						<a href="javascript:;" id="btn_submit" class="btn_check">完成</a> 
					</div>
				</div>
	</body>
</html>
<script type="text/javascript" src="static/js/jquery-3.1.0.js"></script>
<script type="text/javascript">
	$(function(){
		$('input[name=image]').change(function(){
			$('form').submit();
		});
	});
</script>